//  Created by EasyIOS on 14-4-10.
//  Copyright (c) 2014年 zhuchao. All rights reserved.
//

#import <Foundation/Foundation.h>

static const NSInteger SECOND = 1;
static const NSInteger MINUTE = 60 * SECOND;
static const NSInteger HOUR = 60 * MINUTE;
static const NSInteger DAY = 24 * HOUR;
static const NSInteger MONTH = 30 * DAY;
static const NSInteger YEAR = 12 * MONTH;

@interface NSDate (XY)

@property (nonatomic, readonly) NSInteger year;
@property (nonatomic, readonly) NSInteger month;
@property (nonatomic, readonly) NSInteger day;
@property (nonatomic, readonly) NSInteger hour;
@property (nonatomic, readonly) NSInteger minute;
@property (nonatomic, readonly) NSInteger second;
@property (nonatomic, readonly) NSInteger weekday;

- (NSString *)stringWithDateFormat:(NSString *)dateFormat;

+ (NSDate *)dateWithString:(NSString *)string dateFormat:(NSString *)dateFormat;
+ (NSString *)stringWithDateFormat:(NSString *)dateFormat secs:(NSTimeInterval)secs;
+ (NSString *)descriptionWithDateFormat:(NSString *)dateFormat secs:(NSTimeInterval)secs;

@end
